package collections1;

import java.util.Calendar;
import java.util.Scanner;

public class Huiyuan {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		Calendar cal = Calendar.getInstance();
		int day = cal.get(Calendar.DAY_OF_MONTH);
		System.out.println("请输入购物金额(元)：");
		double num = input.nextDouble();
		System.out.println("请输入是否是会员？（y/其他字符）");
		String memberCard = input.next();
		if (memberCard.equals("y")) {
			if (day == 18 || day == 8 || day == 28) {
				num *= 0.8;
			}
		}
		System.out.println("购物金额：" + num);
	}
}
